<template>
  <div class="home">
    <top></top>

    <el-main>
      <el-card class="box-card">
        <div slot="header" class="clearfix">
          <span>用户信息卡</span>
          <el-button style="float: right; padding: 3px 0" type="text">操作按钮</el-button>
        </div>
        <div class="text item">
          用户账号 :  {{userInfo.username}}
        </div>
        <div class="text item">
          用户密码 : {{userInfo.password}}
        </div>
        <div class="text item">
          真实姓名 : {{userInfo.realname}}
        </div>
        <div class="text item">
          证件号码 :  {{userInfo.idType}}
        </div>
      </el-card>
    </el-main>

  </div>
</template>

<script>
  import {mapGetters, mapMutations, mapActions} from 'vuex'

  import Top from '@/common/top'


  export default {
    name: "home",
    components: {
      Top
    },
    computed: {
      ...
        mapGetters([
          'userInfo'
        ])
    }
  }
</script>

<style>
  .el-header {
    background-color: #B3C0D1;
    color: #333;
    line-height: 60px;
  }

  .home {
    width: 100%;
  }

  .text {
    font-size: 14px;
  }

  .item {
    margin-bottom: 18px;
  }

  .clearfix:before,
  .clearfix:after {
    display: table;
    content: "";
  }

  .clearfix:after {
    clear: both
  }

  .box-card {
    /* width: 480px;*/
  }

</style>
